/*
 * @Description:
 * @Author: fhw
 * @Date: 2023-02-06 14:38:54
 */
import { ResumeProject } from '@/interface/resume'
import { map } from 'ramda'
import { defineComponent, PropType } from 'vue'
import ProjectImage from '@/assets/image/resume/project.png'

const props = {
	dataSource: {
		type: Array as PropType<ResumeProject[]>,
		default: [],
	},
} as const
export default defineComponent({
	props,
	setup(props) {
		return () => (
			<div class="project-content" id="project-section">
				<div class="project awards">
					<div class="main-title ">
						<span class="icon">
							<img src={ProjectImage} alt="" />
						</span>
						<span class="txt">项目</span>
					</div>
					{map((item) => {
						return (
							<div class="project-box">
								<h4>{item.title}</h4>
								<div class="describe">{item.describe}</div>
								<h5>项目职责</h5>
								<div class="technology">
									<ul>
										{item.technology?.map((data) => (
											<li>{data.text}</li>
										))}
									</ul>
								</div>
								<a-divider />
							</div>
						)
					}, props.dataSource ?? [])}
				</div>
			</div>
		)
	},
})
